<template>
  <div class="hello">
    <a @click="goHome">{{ msg }}</a>
    <a @click="goMusic">音乐</a>
    <a @click="goMovie">电影</a>

    <h2>看电影--大头儿子小头爸爸</h2>

  </div>
</template>

<script>

export default {
  name: 'home',
  data () {
    return {
      msg: '首页'
    }
  },
  mounted () {
    // DOM更新完后再请求数据
    // let userId = this.$route.params.userId;
  },
  methods: {
     goHome(){
      this.$router.push({path:'/home'})
    },
    goMusic(){
      this.$router.push({path:'/music'})
    },
    goMovie(){
      this.$router.push({path:'/movie'})
    }
  }

}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
